home *** CD-ROM | disk | FTP | other *** search
- /* graphics libraries:
- Perspective mapping generation routines
- by Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
- Copyright 1987 - 1993 Apple Computer, Inc. All rights reserved. */
-
- #pragma once
- #ifndef cameraLibraryIncludes
- #define cameraLibraryIncludes
-
- #include "math types.h"
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- struct point3D {
- Fixed x;
- Fixed y;
- Fixed z;
- };
-
- struct unit3D {
- fract x;
- fract y;
- fract z;
- };
-
- struct camera {
- struct point3D location;
- struct point3D axis;
- struct point3D zenith;
- struct point3D observer;
- gxMapping orientation;
- };
-
- struct patch {
- struct point3D u;
- struct point3D v;
- struct point3D origin;
- };
-
- #ifndef __cplusplus
- typedef struct point3D point3D;
- typedef struct unit3D unit3D;
- typedef struct camera camera;
- typedef struct patch patch;
- #endif
-
- void InitCamera(camera *);
- void UpdateCamera(camera *);
- void PatchToCameraMap(patch *, camera *, gxMapping *);
- Fixed Unitize(point3D *, unit3D *);
- fract FracDot(unit3D *, unit3D *);
- void FracCross(unit3D *, unit3D *, unit3D *cross);
-
- #ifdef __cplusplus
- }
- #endif
- #endif
-